package com.noahplat.datapro.mapper;

import com.noahplat.datapro.pojo.Sleep;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import tk.mybatis.mapper.common.Mapper;

import java.util.Date;
import java.util.List;

public interface SleepProMapper extends Mapper<Sleep> {
    @Select("select sleep as sleep,type as type from sleep_${imei} where startts >= #{startDate} and startts < #{endDate} order by ts desc")
    List<Sleep> getSleep( @Param("imei") String imei, @Param("startDate") Date startDate, @Param("endDate") Date endDate);
}
